<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <body>

        <ui:composition template="./management.xhtml">

            <ui:define name="b">
                <h:form >
                    <h:dataTable value="#{phongTroBean.allPhongTro}" var="employee"
                                 styleClass="col-md-12"
                                 headerClass="employeeTableHeader"
                                 rowClasses="employeeTableOddRow,employeeTableEvenRow"
                                 >
                        <h:column>    				
                            <f:facet name="header">Ngày Đăng</f:facet>    				
                             #{employee.ngaydang}
                        </h:column>
                       
                        <h:column>    				
                            <f:facet name="header"> Người đăng</f:facet>    				
                                #{employee.user.hoten}
                        </h:column>
                        <h:column>    				
                            <f:facet name="header"> Tiêu Đề</f:facet>    				
                                #{employee.tieudegioithieu}
                        </h:column>

                        <h:column>    				
                            <f:facet name="header"> Quận</f:facet>    				
                                #{employee.quan.tenquan}
                        </h:column>
                        <h:column class=" alert alert-info">    				
                            <f:facet name="header">Diện Tích</f:facet>    				
                                #{employee.dientich}
                        </h:column>
                        <h:column>    				
                            <f:facet name="header">Số Phòng</f:facet>    				
                                #{employee.sophong}
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Action"/>
                            </f:facet>
                            <h:commandLink action="#{phongTroBean.edit(employee)}" value="Sửa" style="margin-left: 10px"></h:commandLink>
                            <h:commandLink action="#{phongTroBean.xoa(employee.maphongtro)}" value="Xóa" style="margin-left: 10px"></h:commandLink>
                            
                        </h:column>
                    </h:dataTable>
                    
                </h:form>
            </ui:define>
        </ui:composition>
    </body> 
</html>
